package cn.school.thoughtworks.section1;

import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class PracticeC {
    List<String> collectSameElements(List<String> collection1, Map<String,List<String>> collection2) {
        Stream<String> stream = collection1.stream();
        Stream<String> stringStream = stream.filter(collection2.get("value")::contains);
        return stringStream.collect(Collectors.toList());

    }
}